/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-28 14:11:33
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2024-04-20 18:01:19
 * @FilePath: /yt-devops/lib/utils/liquid_formats.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:get/get.dart';
import 'package:yt_devops/resources/str_res_keys.dart';

class LiquidFormats {
  static String externalFaultFormat(value) {
    var map = {
      "0": ResKey.thingsEffective.tr, //"有效",
      "1": "ResKey.alarm.tr"
    };
    return map[value.toString()] ?? '';
  }

  static firstLevelAlarmFormat(value) {
    var specs = {
      "0": ResKey.thingsEffective.tr, //"有效",
      "1": "一级报警"
    };
    return specs[value.toString()] ?? "";
  }

  static secondLevelAlarmFormat(value) {
    var specs = {
      "0": ResKey.thingsEffective.tr, //"有效",
      "1": "二级报警"
    };
    return specs[value.toString()] ?? "";
  }

  static threeLevelAlarmFormat(value) {
    var specs = {
      "0": ResKey.thingsEffective.tr, //"有效",
      "1": "三级报警"
    };
    return specs[value.toString()] ?? "";
  }
}
